<template>
  <div id="app">
    <router-view v-if="isRouterAlive"></router-view> 
  </div>
</template>

<script>
import Header from "./components/Header";
import Aside from "./components/Aside";
export default {
  name: "App",
  components: {
    Header,
    Aside
  },
    provide () {
        return {
            reload: this.reload
        }
    },

  data() {
    return {
      isRouterAlive: true
    };
  },
  mounted() {
  },
  methods: {
    reload() {
      this.isRouterAlive = false;
      this.$nextTick(function() {
        this.isRouterAlive = true;
      });
    }
  }
};
</script>

<style>
#app {
  font-family: "Microsoft YaHei", Helvetica, Arial, sans-serif;
  font: 14px "Microsoft YaHei";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}
.el-main {
  position: relative;
}

</style>
